package final2107.night.day01;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Test {
    public static void main(String[] args) {
        List<Student> list = new ArrayList<>();
        Student student1 = new Student(1002,"tom",21,168,50);
        Student student2 = new Student(1001,"tom2",21,176,55);
        Student student3 = new Student(1003,"tom3",22,179,95);
        Student student4 = new Student(1006,"tom4",25,177,85);
        Student student5 = new Student(1009,"tom6",24,176,60);
        Student student6 = new Student(1005,"tom8",24,176,55);

        list.add(student1);
        list.add(student2);
        list.add(student3);
        list.add(student4);
        list.add(student5);
        list.add(student6);

        Collections.sort(list);
        for (Student s:list) {
            System.out.println(s);

        }
    }
}
